passing array to function in c by reference